﻿Imports UnScripter.Project

Public Class ToolsMenu
    Public Sub ShowResourcesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If Not IsNothing(Globals.CurrentProject) Then
            ResourceDialog.Files = Globals.CurrentProject.FileList.RelativeFiles
            Dim result = ResourceDialog.ShowDialog()
            If result = Windows.Forms.DialogResult.OK Then
                Dim projectfile = Globals.CurrentProject.FileList.GetProjectFile(ResourceDialog.SelectedFullName)
                MainForm.EditorTabManager.AddTab(projectfile.FileName, projectfile)
            End If
        End If
    End Sub

    Public Sub ShowOptions(ByVal sender As System.Object, ByVal e As System.EventArgs)
        OptionsDialog.Show()
    End Sub
End Class
